<%@ page language="java" %>

<%@ page import="com.scalar.chiptrack.commons.SessionKeys,
                com.scalar.chiptrack.users.User,
                com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/packingSlipMenu.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<% User user1 = (User)session.getAttribute (SessionKeys.USER_KEY); %>

<html:html locale="true">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<style type="text/css">
a { text-decoration : none}
@page {
  size: landscape;
	}
}
</style>

<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type='text/css' rel='stylesheet'>
<SCRIPT language="JavaScript">

<%--function sendMail ( vendorId, purchaseOrderId, poType, poNumber )
{
    newWindow = window.open ('<%=chipTracContext%>/sendPoMailAck.do?action=showSendMailWindow&vendorId='+vendorId+'&purchaseOrderId='+purchaseOrderId+'&poType='+poType+'&poNumber='+poNumber,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}--%>

function sendMail ( vendorId, purchaseOrderId, poType, poNumber )
{
    newWindow = window.open ('<%=chipTracContext%>/sendPoMailAck.do?action=showSendMailWindow&vendorId='+vendorId+'&purchaseOrderId='+purchaseOrderId+'&poType='+poType+'&poNumber='+poNumber,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}



</SCRIPT>

</HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<!-- body starts -->
<html:form method="post" name="openPurchaseOrderForm" action="/openPurchaseOrder" type="com.scalar.chiptrack.finance.openpo.forms.OpenPurchaseOrderForm">
<table width="90%" align=center border='0'>
    <tr>
		<td width="30%" align="center">
			<img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="84" width="200" border=0>
		</td>
        <td width="40%"  align="center" class="NArialL">
			<font class='NArialW'>Open Purchase Order Acknowledgement</font><br>
			<bean:write name="openPurchaseOrderForm" property="clientInfo.clientName" /><br>
            <bean:write name="openPurchaseOrderForm" property="clientAddressAsStringForHTML" filter="false"/>
		</td>
        <td width="15%" id="printerIconCell">
			<table width='50'align=center background='<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif'>
				<tr>
					<td>
						<a href="javascript:window.print();" title='Click here to print the purchase order'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
				        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
				        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</td>
				</tr>
			</table>
        </td>
        <td width="15%" id="emailIconCell">
			<table border ="0"  background='<%=chipTracContext%>/jsp/includes/images/email1.gif'>
				<tr>
					<td>
						<a href="javascript:sendMail(<bean:write name="openPurchaseOrderForm" property="vendor_id"/>, <bean:write name="openPurchaseOrderForm" property="purchaseOrder_id"/>, <bean:write name="openPurchaseOrderForm" property="poType" />, '<bean:write name="openPurchaseOrderForm" property="poNumber" />' )" title='Click here to send mail'>&nbsp;&nbsp;&nbsp;&nbsp;</a>
					</td>
				</tr>
			</table>
        </td>
	</tr>
    <tr>
    <td colspan='4' height='35'>&nbsp;</td>
    </tr>
    <tr>
		<td colspan='4' width="40%">
			<table width="100%" border=0 cellspacing=0 cellpadding=0>
				<tr>
			        <td bgcolor='#FFFFEE'  height="100%" class="NArialRS" align="left" width="40%">
						<table width="100%" height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0'>
							<tr height=30>
								<td class="NArialR" bgcolor="#DEE1E2" >Bill To Address:</td>
							</tr>
							<tr>
								<td class="NArialRS" valign="top">
                                <bean:write name="openPurchaseOrderForm" property="billingAddressAsStringForHTMLWithBreaks" filter="false"/>&nbsp;
								</td>
							</tr>
						</table>
					</td>
					<td width="20%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
					<td bgcolor='#FFFFEE' class="NArialRS" align ="right"  width="40%" height="100%">
						<table width="100%"  height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0'>
							<tr height=30><td class="NArialR" bgcolor="#DEE1E2" >Ship To Address:</td></tr>
							<tr>
								<td class="NArialRS" valign="top">
                                <bean:write name="openPurchaseOrderForm" property="shippingAddressAsStringForHTMLWithBreaks" filter="false"/>&nbsp;
								</td>
							</tr>
			            </table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td colspan='4'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
	<tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
		<td colspan=4 width="100%">
			<table border='1' width="100%" class='NArialRS' bordercolor='#000000' cellspacing='0'>
	            <tr>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>PO Number</td>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>PO Type</td>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>PO Date</td>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>Vendor Name</td>
					<td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>Vendor Quote No</td>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>PO Max $</td>
                    <td width='14%'  align='center' bgcolor='#DEE1E2' class='NArialR'>Valid From</td>
                    <td width='14%' align='center' bgcolor='#DEE1E2' class='NArialR'>Valid To</td>
				</tr>
                <tr>
	                <td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="poNumber" />&nbsp;</td>
                    <td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="POTypeString" />&nbsp;</td>
					<td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="poDate" />&nbsp;</td>
                    <td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="vendorName" />&nbsp;</td>
                    <td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="vendorQuoteNumber" />&nbsp;</td>
                    <td width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="poMaxAmt" />&nbsp;</td>
                    <td width='14%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="validFromDate" />&nbsp;</td>
                    <td width='14%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="validToDate" />&nbsp;</td>
                </tr>
                <tr>
                    <td colspan='4' width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>Shipping Method</td>
                    <td colspan='4' width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>Pay Terms</td>
				</tr>
                <tr>
	                <td colspan='4' width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="shipMethod" />&nbsp;</td>
                    <td colspan='4' width='12%' align='center' bgcolor='#FFFFEE'><bean:write name="openPurchaseOrderForm" property="payTerms" />&nbsp;</td>
                </tr>
            </table>



        </td>
	</tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
	<tr><td colspan=4><font class="NArialR"><strong><u>Comments: </u></strong></font></td></tr>
    <tr><td colspan=4 bgcolor='#DEE1E2' width="100%"><font class="NArialRS">
    <bean:write name="openPurchaseOrderForm" property="commentsForHTML" filter="false"/>&nbsp;
	</font></td></tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
	<tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>

</table>
</html:form>
</body>
</html:html>